<?php
namespace Resmodel;

use Model\LanguageAwareInterface;
use Zend\Db\Adapter\Adapter;
use Zend\Db\Sql\Expression;
use Zend\Db\Sql\Predicate\Like;
use Zend\Db\Sql\Predicate\Operator;
use Zend\Db\Sql\Select;
use Zend\InputFilter\InputFilter;

class DishArticleTable extends ResAbstractTable implements LanguageAwareInterface
{

    private $_lang;
    /**
     * @param $id
     * @return DishArticle
     */
    public function getDishArticle($id){
       return $this->getById($id);
    }

    /**
     * @return InputFilter
     */
    public function getInputFilter()
    {
        $filter = new InputFilter();
        return $filter;
    }

    public function getLang()
    {
        return $this->_lang;
    }

    public function setLang($lang)
    {
        $this->_lang = $lang;
    }

    public function getAllArticleByDishId($id)
    {
        return $this->getTableGateway()->select(
            array('dish_id'=>$id, 'lang'=>$this->getLang()));
    }

}